3.108 \(\int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx\)

Optimal. Leaf size=53 \[ \frac {\sinh (c+d x)}{d (a+b)}+\frac {b \tan ^{-1}\left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a+b)^{3/2}} \]

[Out]

sinh(d*x+c)/(a+b)/d+b*arctan(sinh(d*x+c)*(a+b)^(1/2)/a^(1/2))/(a+b)^(3/2)/d/a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3676, 388, 205} \[ \frac {\sinh (c+d x)}{d (a+b)}+\frac {b \tan ^{-1}\left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a+b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[c + d*x]/(a + b*Tanh[c + d*x]^2),x]

[Out]

(b*ArcTan[(Sqrt[a + b]*Sinh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a + b)^(3/2)*d) + Sinh[c + d*x]/((a + b)*d)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1+x^2}{a+(a+b) x^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {\sinh (c+d x)}{(a+b) d}+\frac {b \operatorname {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\sinh (c+d x)\right )}{(a+b) d}\\ &=\frac {b \tan ^{-1}\left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{3/2} d}+\frac {\sinh (c+d x)}{(a+b) d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 53, normalized size = 1.00 \[ \frac {\sinh (c+d x)}{d (a+b)}+\frac {b \tan ^{-1}\left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a+b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[c + d*x]/(a + b*Tanh[c + d*x]^2),x]

[Out]

(b*ArcTan[(Sqrt[a + b]*Sinh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a + b)^(3/2)*d) + Sinh[c + d*x]/((a + b)*d)

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 766, normalized size = 14.45 \[ \left [\frac {{\left (a^{2} + a b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} + a b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{2} + a b\right )} \sinh \left (d x + c\right )^{2} - \sqrt {-a^{2} - a b} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \log \left (\frac {{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} - 2 \, {\left (3 \, a + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} - 3 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} - {\left (3 \, a + b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left (\cosh \left (d x + c\right )^{3} + 3 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + \sinh \left (d x + c\right )^{3} + {\left (3 \, \cosh \left (d x + c\right )^{2} - 1\right )} \sinh \left (d x + c\right ) - \cosh \left (d x + c\right )\right )} \sqrt {-a^{2} - a b} + a + b}{{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} + 2 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a + b}\right ) - a^{2} - a b}{2 \, {\left ({\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) + {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )\right )}}, \frac {{\left (a^{2} + a b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} + a b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{2} + a b\right )} \sinh \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} + a b} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \arctan \left (\frac {{\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (a + b\right )} \sinh \left (d x + c\right )^{3} + {\left (3 \, a - b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + 3 \, a - b\right )} \sinh \left (d x + c\right )}{2 \, \sqrt {a^{2} + a b}}\right ) + 2 \, \sqrt {a^{2} + a b} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \arctan \left (\frac {\sqrt {a^{2} + a b} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )}}{2 \, a}\right ) - a^{2} - a b}{2 \, {\left ({\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) + {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/2*((a^2 + a*b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + a*b)*sinh(d*x + c)^2 -
sqrt(-a^2 - a*b)*(b*cosh(d*x + c) + b*sinh(d*x + c))*log(((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*si
nh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 - 2*(3*a + b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 - 3*a - b
)*sinh(d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 - (3*a + b)*cosh(d*x + c))*sinh(d*x + c) - 4*(cosh(d*x + c)^3 +
 3*cosh(d*x + c)*sinh(d*x + c)^2 + sinh(d*x + c)^3 + (3*cosh(d*x + c)^2 - 1)*sinh(d*x + c) - cosh(d*x + c))*sq
rt(-a^2 - a*b) + a + b)/((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x
+ c)^4 + 2*(a - b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a - b)*sinh(d*x + c)^2 + 4*((a + b)*cosh(d
*x + c)^3 + (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b)) - a^2 - a*b)/((a^3 + 2*a^2*b + a*b^2)*d*cosh(d*x +
c) + (a^3 + 2*a^2*b + a*b^2)*d*sinh(d*x + c)), 1/2*((a^2 + a*b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*
sinh(d*x + c) + (a^2 + a*b)*sinh(d*x + c)^2 + 2*sqrt(a^2 + a*b)*(b*cosh(d*x + c) + b*sinh(d*x + c))*arctan(1/2
*((a + b)*cosh(d*x + c)^3 + 3*(a + b)*cosh(d*x + c)*sinh(d*x + c)^2 + (a + b)*sinh(d*x + c)^3 + (3*a - b)*cosh
(d*x + c) + (3*(a + b)*cosh(d*x + c)^2 + 3*a - b)*sinh(d*x + c))/sqrt(a^2 + a*b)) + 2*sqrt(a^2 + a*b)*(b*cosh(
d*x + c) + b*sinh(d*x + c))*arctan(1/2*sqrt(a^2 + a*b)*(cosh(d*x + c) + sinh(d*x + c))/a) - a^2 - a*b)/((a^3 +
 2*a^2*b + a*b^2)*d*cosh(d*x + c) + (a^3 + 2*a^2*b + a*b^2)*d*sinh(d*x + c))]

________________________________________________________________________________________

giac [B]  time = 0.27, size = 1117, normalized size = 21.08 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x, algorithm="giac")

[Out]

-1/2*(2*(2*(2*a^2*b^2 - (a^2*b - a*b^2)*sqrt(-a*b))*sqrt(a^2 - b^2 + 2*sqrt(-a*b)*(a + b))*(a*e^(2*c) + b*e^(2
*c))^2*abs(a*e^(2*c) + b*e^(2*c)) - (a^4*b + a^3*b^2 - a^2*b^3 - a*b^4 + 2*(a^3*b + 2*a^2*b^2 + a*b^3)*sqrt(-a
*b))*sqrt(a^2 - b^2 + 2*sqrt(-a*b)*(a + b))*abs(a*e^(2*c) + b*e^(2*c))*abs(-a*e^(2*c) - b*e^(2*c))*e^(2*c) - (
2*a^4*b^2 + 2*a^3*b^3 - 2*a^2*b^4 - 2*a*b^5 - (a^4*b - 2*a^2*b^3 + b^5)*sqrt(-a*b))*sqrt(a^2 - b^2 + 2*sqrt(-a
*b)*(a + b))*abs(a*e^(2*c) + b*e^(2*c))*e^(4*c))*arctan(e^(d*x)/sqrt((a^2*e^(2*c) - b^2*e^(2*c) - sqrt((a^2*e^
(2*c) - b^2*e^(2*c))^2 - (a^2*e^(4*c) + 2*a*b*e^(4*c) + b^2*e^(4*c))*(a^2 + 2*a*b + b^2)))/(a^2*e^(4*c) + 2*a*
b*e^(4*c) + b^2*e^(4*c))))*e^(-4*c)/((a^8 + 5*a^7*b + 9*a^6*b^2 + 5*a^5*b^3 - 5*a^4*b^4 - 9*a^3*b^5 - 5*a^2*b^
6 - a*b^7 + 2*(a^7 + 6*a^6*b + 15*a^5*b^2 + 20*a^4*b^3 + 15*a^3*b^4 + 6*a^2*b^5 + a*b^6)*sqrt(-a*b))*abs(-a*e^
(2*c) - b*e^(2*c))) + 2*(2*(4*a^3*b^2 - 4*a^2*b^3 + (a^3*b - 6*a^2*b^2 + a*b^3)*sqrt(-a*b))*(a*e^(2*c) + b*e^(
2*c))^2*abs(a*e^(2*c) + b*e^(2*c)) - (a^5*b - 4*a^4*b^2 - 10*a^3*b^3 - 4*a^2*b^4 + a*b^5 - 4*(a^4*b + a^3*b^2
- a^2*b^3 - a*b^4)*sqrt(-a*b))*abs(a*e^(2*c) + b*e^(2*c))*abs(-a*e^(2*c) - b*e^(2*c))*e^(2*c) - (4*a^5*b^2 - 8
*a^3*b^4 + 4*a*b^6 + (a^5*b - 5*a^4*b^2 - 6*a^3*b^3 + 6*a^2*b^4 + 5*a*b^5 - b^6)*sqrt(-a*b))*abs(a*e^(2*c) + b
*e^(2*c))*e^(4*c))*arctan(e^(d*x)/sqrt((a^2*e^(2*c) - b^2*e^(2*c) + sqrt((a^2*e^(2*c) - b^2*e^(2*c))^2 - (a^2*
e^(4*c) + 2*a*b*e^(4*c) + b^2*e^(4*c))*(a^2 + 2*a*b + b^2)))/(a^2*e^(4*c) + 2*a*b*e^(4*c) + b^2*e^(4*c))))*e^(
-4*c)/((a^7 + 4*a^6*b + 5*a^5*b^2 - 5*a^3*b^4 - 4*a^2*b^5 - a*b^6 - 2*(a^6 + 5*a^5*b + 10*a^4*b^2 + 10*a^3*b^3
 + 5*a^2*b^4 + a*b^5)*sqrt(-a*b))*sqrt(a^2 - b^2 - 2*sqrt(-a*b)*(a + b))*abs(-a*e^(2*c) - b*e^(2*c))) - e^(d*x
 + 6*c)/(a*e^(5*c) + b*e^(5*c)) + e^(-d*x)/(a*e^c + b*e^c))/d

________________________________________________________________________________________

maple [B]  time = 0.38, size = 315, normalized size = 5.94 \[ -\frac {2}{d \left (2 b +2 a \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {b \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}\right )}{d \left (a +b \right ) \sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}+\frac {b^{2} \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}\right )}{d \left (a +b \right ) \sqrt {b \left (a +b \right )}\, \sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}+\frac {b \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}\right )}{d \left (a +b \right ) \sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}+\frac {b^{2} \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}\right )}{d \left (a +b \right ) \sqrt {b \left (a +b \right )}\, \sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}-\frac {2}{d \left (2 b +2 a \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x)

[Out]

-2/d/(2*b+2*a)/(tanh(1/2*d*x+1/2*c)+1)-1/d*b/(a+b)/((2*(b*(a+b))^(1/2)-a-2*b)*a)^(1/2)*arctanh(a*tanh(1/2*d*x+
1/2*c)/((2*(b*(a+b))^(1/2)-a-2*b)*a)^(1/2))+1/d*b^2/(a+b)/(b*(a+b))^(1/2)/((2*(b*(a+b))^(1/2)-a-2*b)*a)^(1/2)*
arctanh(a*tanh(1/2*d*x+1/2*c)/((2*(b*(a+b))^(1/2)-a-2*b)*a)^(1/2))+1/d*b/(a+b)/((2*(b*(a+b))^(1/2)+a+2*b)*a)^(
1/2)*arctan(a*tanh(1/2*d*x+1/2*c)/((2*(b*(a+b))^(1/2)+a+2*b)*a)^(1/2))+1/d*b^2/(a+b)/(b*(a+b))^(1/2)/((2*(b*(a
+b))^(1/2)+a+2*b)*a)^(1/2)*arctan(a*tanh(1/2*d*x+1/2*c)/((2*(b*(a+b))^(1/2)+a+2*b)*a)^(1/2))-2/d/(2*b+2*a)/(ta
nh(1/2*d*x+1/2*c)-1)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x\right )}}{2 \, {\left (a d e^{c} + b d e^{c}\right )}} + \frac {1}{2} \, \int \frac {4 \, {\left (b e^{\left (3 \, d x + 3 \, c\right )} + b e^{\left (d x + c\right )}\right )}}{a^{2} + 2 \, a b + b^{2} + {\left (a^{2} e^{\left (4 \, c\right )} + 2 \, a b e^{\left (4 \, c\right )} + b^{2} e^{\left (4 \, c\right )}\right )} e^{\left (4 \, d x\right )} + 2 \, {\left (a^{2} e^{\left (2 \, c\right )} - b^{2} e^{\left (2 \, c\right )}\right )} e^{\left (2 \, d x\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/2*(e^(2*d*x + 2*c) - 1)*e^(-d*x)/(a*d*e^c + b*d*e^c) + 1/2*integrate(4*(b*e^(3*d*x + 3*c) + b*e^(d*x + c))/(
a^2 + 2*a*b + b^2 + (a^2*e^(4*c) + 2*a*b*e^(4*c) + b^2*e^(4*c))*e^(4*d*x) + 2*(a^2*e^(2*c) - b^2*e^(2*c))*e^(2
*d*x)), x)

________________________________________________________________________________________

mupad [B]  time = 1.68, size = 154, normalized size = 2.91 \[ \frac {{\mathrm {e}}^{c+d\,x}}{2\,d\,\left (a+b\right )}-\frac {{\mathrm {e}}^{-c-d\,x}}{2\,d\,\left (a+b\right )}-\frac {b\,\ln \left (\sqrt {-a}\,\sqrt {a+b}+2\,a\,{\mathrm {e}}^{c+d\,x}-\sqrt {-a}\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\sqrt {a+b}\right )}{2\,\sqrt {-a}\,d\,{\left (a+b\right )}^{3/2}}+\frac {b\,\ln \left (2\,a\,{\mathrm {e}}^{c+d\,x}-\sqrt {-a}\,\sqrt {a+b}+\sqrt {-a}\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\sqrt {a+b}\right )}{2\,\sqrt {-a}\,d\,{\left (a+b\right )}^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(c + d*x)/(a + b*tanh(c + d*x)^2),x)

[Out]

exp(c + d*x)/(2*d*(a + b)) - exp(- c - d*x)/(2*d*(a + b)) - (b*log((-a)^(1/2)*(a + b)^(1/2) + 2*a*exp(c + d*x)
 - (-a)^(1/2)*exp(2*c + 2*d*x)*(a + b)^(1/2)))/(2*(-a)^(1/2)*d*(a + b)^(3/2)) + (b*log(2*a*exp(c + d*x) - (-a)
^(1/2)*(a + b)^(1/2) + (-a)^(1/2)*exp(2*c + 2*d*x)*(a + b)^(1/2)))/(2*(-a)^(1/2)*d*(a + b)^(3/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cosh {\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)**2),x)

[Out]

Integral(cosh(c + d*x)/(a + b*tanh(c + d*x)**2), x)

________________________________________________________________________________________